import service from '@/utils/request'

export const useSalesApi = (id: Number) => {
	return service.get('/sys/sales/' + id)
}

export const useSalesSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/sys/sales', dataForm)
	} else {
		return service.post('/sys/sales/save', dataForm)
	}
}
export const useSalesFileApi = (dataForm: any) => {
	return service.post('/sys/sales/savefile', dataForm)
}
export const useSalesListApi = (dataForm: any) => {
	return service.post('/sys/sales/list', dataForm)
}
